﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SBag extends IMessageBase
    {
        public var posType:int;
        public var capacity:int;
        public var playerItems:Array;
        public const _type:int = 64;
        public static var _regist:SBag = new SBag(true);

        public function SBag(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SBag();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.posType);
            param1.writeInt(this.capacity);
            SeqPlayerItemHelper.write(param1, this.playerItems);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.posType = param1.readInt();
            this.capacity = param1.readInt();
            this.playerItems = SeqPlayerItemHelper.read(param1);
            return;
        }// end function

    }
}
